<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class MiniUser extends Model
{
    use HasFactory;
    
    protected $table = 'mini_users';
    
    protected $fillable = [
        'openid',
        'union_id',
        'session_key',
        'nickname',
        'avatar',
        'phone',
        'real_name',
        'id_card',
        'id_type',
        'status',
        'last_login_at'
    ];
    
    protected $casts = [
        'last_login_at' => 'datetime',
        'status' => 'integer',
        'id_type' => 'integer'
    ];
    
    protected $hidden = [
        'session_key'
    ];
}
